<%@ include file="/static/common/taglibs.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
    <meta name="author" content="jack"/>
    <meta name="keywords" content="网页描述"/>
    <meta name="description" content="网页关键字"/>
    <title>我的珠宝店</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/css/global.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/css/layout.css"/>
    <script type="text/javascript" src="${ctx}/static/js/jquery.min.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/global.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/ring-list.js"></script>
  <%--  <script type="application/javascript">
        var pageNum = 1;
        $(document).ready(function () {
            $(".zuan_nav .a1").click(function () {
                $(this).siblings(".a1").removeClass("cur");
                $(this).addClass("cur");
                pageNum = 1;
                $.post("${ctx}/ring/search",
                        {typeName: $(".a1.cur").text()},
                        function (data) {
                            $(data).replaceAll($("#list"));
                            $("#typeTitle").text($(".a1.cur").text());
                        });

            });
        })

        function more(){
            var typeName = $(".a1.cur").text();
            pageNum = pageNum + 1;
            $.post("${ctx}/ring/more",
                    {typeName: $(".a1.cur").text(),page:pageNum},
                    function (data) {
                        $("#listEnd").before($(data));
                        $("#typeTitle").text($(".a1.cur").text());
                    });

        }

    </script>--%>
</head>

<body>
<div id="wrap" style="position:relative;">
    <div class="head">
        <div class="top">
            <h1><a href="${ctx}/index/toIndex"><img src="${ctx}/static/images/logo_head.jpg" alt=""/></a></h1>

            <div class="nav"><a href="${ctx}/index/toIndex"><img src="${ctx}/static/images/top_xtb.jpg" alt=""/>　挑选钻石/戒托</a>　|　<a href="${ctx}/account/user/">
                <img src="${ctx}/static/images/head_xtb1.jpg" alt=""/>　我的帐户</a>　|　
                <a href="${ctx}/ShopCart/"><img src="${ctx}/static/images/head_xtb2.jpg" alt=""/>　购物车 <b id="shopCartCount">0</b> 件</a>　|　
                <a href="${ctx}/logout"><img src="${ctx}/static/images/head_xtb3.jpg" alt=""/>　退出登录</a></div>
            <div class="del_float"></div>
        </div>
    </div>
    <div class="zuan_list">
        <h2><span><a href="${ctx}/jewel/">
            <img src="${ctx}/static/images/zuan_btn.jpg" alt=""/></a></span>挑选戒托</h2>
        <div class="del_float"></div>
        <div class="zhuan_list_table jie_list_table">
            <h3>请按照重量筛选分类</h3>

            <div class="zuan_nav">
                <a class="a1 cur">显示全部</a>
                <c:forEach items="${ringTypes}" var="ringType">
                    <a class="a1">${ringType.name}</a>
                </c:forEach>
            </div>
            <h4 id="typeTitle">显示全部</h4>

            <div class="jie_list" id="list">
                <c:forEach items="${rings}" var="ring">
                    <dl>
                        
                            <dt><a href="${ctx}/ring/detail/${ring.id}"><img src="${ctx}/ring/getImage?photo=${ring.photo}" width="200px" height="183px"/></a></dt>
                            <dd>
                            	<a href="${ctx}/ring/detail/${ring.id}">
                                <p>编 号：${ring.no}</p>
                                <c:choose>
                                    <c:when test="${cUser.type==2}">
                                        <p>会员价：<b>￥${ring.secondPrice}</b></p>
                                    </c:when>
                                    <c:otherwise>
                                        <p>会员价：<b>￥${ring.price}</b></p>
                                    </c:otherwise>
                                </c:choose>
                                </a>

                            </dd>
                        
                    </dl>
                </c:forEach>

                <div class="del_float" id="listEnd"></div>
            </div>
            <div class="more"><a onClick="more()"  id="moreTr">点击加载更多</a></div>
        </div>
    </div>
    <span id="ding_btn1"><a href="${ctx}/ShopCart/">购物车 <b id="shopCartCount2">0</b> 件</a></span>
    <span id="ding_btn2"><img src="/xipujewelWeb/static/images/ding_btn1-02.png"/></span>
    <div class="footer">© 2014 My jewelry store</div>
</div>
</body>
</html>